//
//  KATBubbleWindow.h
//  KATFramework
//
//  Created by Kantice on 15/11/26.
//  Copyright © 2015年 KatApp. All rights reserved.
//  带箭头的气泡窗体，作为容器

#import <UIKit/UIKit.h>

#import "KATColor.h"
#import "KATSprite.h"


#define BW_DIRECTION_NONE 0
#define BW_DIRECTION_UP 1
#define BW_DIRECTION_DOWN 2
#define BW_DIRECTION_LEFT 3
#define BW_DIRECTION_RIGHT 4


@interface KATBubbleWindow : KATSprite


#pragma -mark 属性

///屏幕尺寸
@property(nonatomic,assign) CGSize screenSize;

///阴影
@property(nonatomic,retain) UIView *shadow;

///内容
@property(nonatomic,retain) UIView *content;

///内容Frame
@property(nonatomic,assign) CGRect contentFrame;

///圆角
@property(nonatomic,assign) float cornerRadius;

///背景色
@property(nonatomic,retain) UIColor *bgColor;

///边界线颜色
@property(nonatomic,retain) UIColor *borderColor;

///边界线宽度
@property(nonatomic,assign) float borderWidth;

///阴影颜色
@property(nonatomic,retain) UIColor *shadowColor;

///气泡图层
@property(nonatomic,retain) CAShapeLayer *bubble;

///方向
@property(nonatomic,assign) int direction;

///动画持续时间
@property(nonatomic,assign) float animationDuration;

///箭头点
@property(nonatomic,assign) CGPoint arrowPoint;

///是否已经显示
@property(nonatomic,assign) BOOL isShown;


#pragma -mark 类方法

///获取实例
+ (instancetype)bubbleWindow;


#pragma -mark 对象方法

///初始化数据
- (void)initData;

///初始化窗口
- (void)initWindow;

///显示
- (void)show;

///隐藏
- (void)hide;


///释放内存
- (void)dealloc;


@end

